package control;

import java.io.Serializable;

import Draw.Base;
import MainWindow.*;

public class Model implements Serializable{
	private BasePanel[] panels = new BasePanel[9];
	String name = null;
	public Model(BasePanel[] panels, String name) {
		for(int i = 0;i<9;i++) {
			this.panels[i] = panels[i];
		}
		this.name = name;
	}

	public void setImage() {
		for (BasePanel panel : panels) {
			if (panel == null) {
				continue;
			}
			Base base = panel.getBase();
			if (base == null) {
				continue;
			}
			panel.setbimg(base.getImgPath());
		}
	}
	
	public BasePanel[] getPanels() {
		return panels;
	}
	
	public String getName() {
		return name;
	}
}
